package au.com.bluelink.scjp.chap1;

public class InterfaceTest {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		
		// Thsi is a feature of java 5, it won't compile onder 1.4
		// enum CoffeeSize {BIG};
		
		System.out.println("Testing interffaces...");
		
		TestConcreteClass test = new TestConcreteClass();
		
		test.someMethod();
		test.someMethod2();
		test.anotherMethod();
		test.oneMoreMethod();
		test.testMethod();

	}
	
}

interface TestInterface {
	
	void someMethod();
	boolean someMethod2();
	
}

interface TestInterface2 extends TestInterface {
	
	void anotherMethod();
}

abstract class TestAbstractClass implements TestInterface2 {
	
	// declare a concrete method...
	public void testMethod() {
		System.out.println("testing concrete method ok");
	}
	
	public void someMethod() {
		System.out.println("someMethod implementation ok");
	}
	
	abstract void oneMoreMethod();
}

class TestConcreteClass extends TestAbstractClass {
	
	public boolean someMethod2() {
		System.out.println("someMethod2 implementation ok");
		return true;
	}
	
	public void anotherMethod() {
		System.out.println("anotherMethod implementation ok");
	}
	
	public void oneMoreMethod() {
		System.out.println("oneMoreMethod implementation ok");
	}
}